#include "page_system.h"

namespace Page
{
    System::System() : Base(){};

    void System::showErrorWifi()
    {
        Base::display.firstPage();
        do
        {
            _displayIconCenter("wifi_error", 256, layoutIconCenterX, layoutIconCenterY);
            _displayTextCenter("Wifi not connected... ", 24, layoutTextCenterX, layoutTextCenterY);
        } while (Base::display.nextPage());
    };

    void System::showErrorHttp()
    {
        Base::display.firstPage();
        do
        {
            _displayIconCenter("wifi_error", 256, layoutIconCenterX, layoutIconCenterY);
            _displayTextCenter("Api response error... ", 24, layoutTextCenterX, layoutTextCenterY);
        } while (Base::display.nextPage());
    };

    void System::showErrorCommon(){
        Base::display.firstPage();
        do
        {
            _displayIconCenter("warning", 256, layoutIconCenterX, layoutIconCenterY);
            _displayTextCenter("some error happend... ", 24, layoutTextCenterX, layoutTextCenterY);
        } while (Base::display.nextPage());
    };

}